<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title><?php echo $view->contest['name']; ?></title>
        <style type="text/css">
            body{ margin:0px; padding:0px; font-family:Arial, Helvetica, sans-serif; font-size:12px;}
            .w810{ width:810px;}
            ul.nav{ list-style:none; margin:0px; padding:0px; width:810px; background:url("<?php echo $view->config['template_url'];?>assets/img/810/bg_nav.jpg") top left repeat-x; height:35px;}
            ul.nav li{ padding:0px; margin:0px; float:left;}
            ul.nav li a{ display:block; padding:5px 10px 5px 10px; color:#5d5d5d; font-weight:bold; text-decoration:none; font-size:20px;}
            ul.nav li a:hover{
                background:#c8c4bf;
            }
            .bg_trans{ background:url("<?php echo $view->config['template_url'];?>assets/img/810/bg_trans.png") top left repeat; padding:8px 0px 8px 0px; color:#fff; text-align:center;}
            .abs1{ position:absolute; left:0px; bottom:0px;}
            .abs2{ position:absolute; top:0px; right:0px; padding:12px 12px 12px 12px; font-size:16px;}
            .po{ position:relative;}
            .p15t{ padding-top:15px;}
            .w190{ width:190px;}
            .w190 a{ text-transform:uppercase; font-weight:bold; font-size:14px; color:#fff; text-decoration:none; display:block;}
            .w190 img{ width:190px; height:120px; border-top:2px solid #000; overflow:hidden;}
            .bg_gray{ background:#666666; text-align:center; color:#fff; padding:8px 0px 8px 0px;}
            .bg_black{ background:#000000; text-align:center; color:#fff; padding:8px 0px 8px 0px;}
            ul.pages{ list-style:none; margin:0px; padding-top:20px; padding-left:0px; float:right; padding-right:6px;}
            ul.pages li{ float:left; margin-right:2px;}
            ul.pages li a{ display:block; padding:3px 8px 3px 8px; text-align:center; color:#fff; background:#a3a3a3; text-decoration:none;}
            ul.pages li a:hover{background:#000000;}
            ul.pages li a.curr{background:#000000;}
            .fs14{ font-size:14px;}         
            
            .lightbox-normal-text-size{
                font-size: 11px;
            }
            .bg_img_lightbox{
                background: url("<?php echo $view->config['template_url'];?>assets/img/810/bg_small_img.png") no-repeat scroll left top transparent;
                height: 65px;
                padding-top: 3px;
                text-align: center;
                width: 65px;
            }
            .wrap{
                margin: 0 auto;
                width: 810px;
            }
        </style>
         <script type="text/javascript" src="../libs/js/jquery.min.js"></script>
        <script type="text/javascript" src="../libs/js/jquery.blockUI.js"></script>
        <script type="text/javascript">
            jQuery.noConflict();
        </script>        

        <script type="text/javascript" src="<?php echo $view->config['template_url'];?>assets/js/contest.js"></script>   

        <link type="text/css" rel="stylesheet" href="../libs/lightface/Assets/LightFace.css" />
        
        <link type="text/css" rel="stylesheet" href="<?php echo $view->config['template_url'];?>assets/css/style.css" />
        
        <script type="text/javascript" src="../libs/js/mootools-1.3.js"></script>

        <script type="text/javascript" src="../libs/lightface/tests/mootools-more-drag.js"></script>
        <script type="text/javascript" src="../libs/lightface/Source/LightFace.js"></script>
        <script type="text/javascript" src="../libs/lightface/Source/LightFace.Request.js"></script>
        <script type="text/javascript" src="../libs/lightface/Source/LightFace.Static.js"></script>
        <script type="text/javascript" src="../libs/lightface/Source/LightFace.IFrame.js"></script>
        <script type="text/javascript" src="../libs/lightface/Source/LightFace.Image.js"></script>

        <!-- start loading private library -->
        <script type="text/javascript" src="<?php echo $view->config['template_url'];?>assets/js/facebooktab.js"></script>
        
        <!-- for friend selectors -->  
        <link rel="stylesheet" href="../libs/js/fbfriendselector/jquery.facebook.multifriend.select.css" /> 
    </head>
    <body>                    
        <script src="http://connect.facebook.net/en_US/all.js"></script>
        <div id="fb-root"></div>
        <script type="text/javascript" charset="utf-8">            
            FB.init({
                appId  : '<?php echo $view->config['facebook_app_id']; ?>',
                status : true, // check login status
                cookie : true, // enable cookies to allow the server to access the session
                xfbml  : true, // parse XFBML               
                oauth  : true // enable OAuth 2.0
            });         
        </script>
        
        <!-- set up the javascript variables --> 
        
        <script type="text/javascript">
            <?php if ($view->isConnectedFacebook) { ?>
                                contestapp.isConnectedFacebook = true;
            <?php } ?>
            // set up for lightbox
            facebooktab.lightboxPaddingTop = 180;
            facebooktab.lightboxAutoAdjust = false;
            contestapp.tostitle = "<?php echo $view->contest['tos_link_text']; ?>";            
            contestapp.isEndOfContest = "<?php echo $view->isEndOfContest; ?>";
            
        </script>
        <div class="wrap">
            <table cellpadding="0" cellspacing="0" align="center" class="w810">
                <tr>
                    <td>
                        <ul class="nav">
                            <?php if($view->contest['show_contribution_tab'] == "on") { ?>
                            <li><a href="?action=vote" <?php if($view->action == "vote"){?>class="curr1"<?php } ?>><?php echo $view->contest['contribution_tab_label']; ?></a></li>                                
                            <?php } ?>

                            <?php if($view->contest['show_signup_tab'] == "on" && !$view->isEndOfContest) { ?>
                            <li><a href="?action=index" <?php if($view->action == "index"){?>class="curr1"<?php } ?>><?php echo $view->contest['signup_tab_lable']; ?></a></li>                                
                            <?php } ?>

                            <?php if($view->contest['show_about_tab'] == "on") { ?>
                            <li><a href="?action=about" <?php if($view->action == "about"){?>class="curr1"<?php } ?>><?php echo $view->contest['tab_lable']; ?></a></li>                                
                            <?php } ?>

                            <?php if($view->contest['show_external_tab'] == "on") { ?>
                            <li><a target="_blank" href="<?php echo $view->contest['external_tab_url'];?>"><?php echo $view->contest['external_tab_text']; ?></a></li>
                            <?php } ?>
                        </ul>
                        <div style="clear:both"></div>
                    </td>
                </tr>
                <tr>
                    <td><img width="810" src="<?php echo $view->contest['banner_overlay_image'];?>" alt="<?php echo $view->contest['overlay_text']; ?>" />
                        <div class="w810 po">
                            <div class="abs1 bg_trans w810 fs14">
                                <?php echo $view->contest['overlay_text']; ?>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                </tr>
            </table>

            <!-- start main content -->
            
                <?php echo $view->view_content; ?>
            
            <!-- end of main content -->
            
            <div style="float:right;padding: 10px;margin-top: -5px;font-size: 8pt;color:black;"><a style="color:#000;" href="javascript:contestapp.showTOSWindow();"><?php echo $view->contest['tos_link_text'];?></a></div>
            
        </div>
        
        <script type="text/javascript" src="http://apis.google.com/js/plusone.js">
            {lang: 'no'}
        </script>    
        <script type="text/javascript" charset="utf-8">
            FB.Canvas.setSize({ width: 810, height: 1800 });
        </script>
        <script type="text/javascript">  
            
            document.id(document.body).addEvent('click',facebooktab.likecloser);        
            
        </script>
        <br/>
    </body>    
</html>